<template>
	<div class="home-bargain">
		<ItemHeader linkUrl="/bargain" title="全民砍价"/>
		<div class="home-bargain-list">
			<BargainItem v-for="item in showBargainList" :key="item.id" :bargainItem="item"/>
		</div>
	</div>
</template>

<script>
	import ItemHeader from '#/Public/ItemHeader';
	import BargainItem from '#/Public/BargainItem';

	export default {
		name: 'Bargain',
		props: {
			bargainList: {
				type: Array,
				default: []
			}
		},
		computed: {
			showBargainList() {
				let list = [...this.bargainList];
				list.splice(3);
				return list;
			}
		},
		components: {
			ItemHeader,
			BargainItem
		},

	}
</script>